export default {
  namespace: 'form',
  state: {
      formData: [
        {
          title: '身份证号',
          rule: /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
          value: 'id',
          init: 362321199203220816
        },
        {
          title: '有效期',
          value: 'time',
          init: '100天'
        },
        {
          title: '登录手机号',
          rule: /^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8])|(19[7]))\d{8}$/,
          value: 'phoneNo',
          init: '15201740368'
        },
        {
          title: '固定电话',
          rule: /0\d{2,3}-\d{7,8}/,
          value: 'telNo',
          init: '0562-2858550'
        },
        {
          title: '联系地址',
          value: 'address',
          init: '上海'
        },
        {
          title: '邮政编码',
          value: 'code',
          init: '1113333'
        },
        {
          title: '电子邮箱',
          value: 'email',
          init: '1245711844@qq.com'
        },
        {
          title: '职位',
          value: 'position',
          init: 'boss',
          type: 'select',
          option: ['boss', 'manager', 'sales']
        },
        {
          title: '学历',
          value: 'school',
          init: '初中',
          type:'select',
          option:['初中', '高中', '大学']
        }
      ]
    },
    effects: {
      * save ({ payload }) {
      yield console.log(payload)
      alert(JSON.stringify(payload))
    }
    }
}